package com.baizhi.controller;
import com.baizhi.entity.Menu;
import com.baizhi.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/menu")
public class MenuController {

    @Autowired
    private MenuService menuService;

    //首页展示中查询左侧的导航栏展示菜单
    @RequestMapping("/child")
    public List<Menu> child(){
        List<Menu> child = menuService.child();
  //      System.out.println(child);
        return child;
    }
}
